import CommonHeader from '@/components/common-header/index'
import SelectSalary from '@/apis/SelectSalary'
import SelectAllSalary from '@/apis/SelectAllSalary'
export default {
  name: 'SalaryShow',
  components: {
    CommonHeader,
  },
  mounted() {
    SelectAllSalary(
      {
        jobNumber: this.$store.state.userInfo.jobNumber,
      },
      this.$store.state.authorization
    ).then((res) => {
      // console.log('查询全部', res)
      this.salaryList = res.data.data
    })
  },
  data() {
    return {
      salaryList: [],
      showSalaryDetail: false,
      popTitle: '',
      salaryInfo: [
        {
          id: 1,
          label: '姓名',
          value: this.$store.state.userInfo.name,
        },
        {
          id: 2,
          label: '工号',
          value: '',
        },
        {
          id: 3,
          label: '基本工资',
          value: '',
        },
        {
          id: 4,
          label: '税前工资',
          value: '',
        },
        {
          id: 5,
          label: '公积金缴费',
          value: '',
        },
        {
          id: 6,
          label: '五险缴费',
          value: '',
        },
        {
          id: 7,
          label: '税费总额',
          value: '',
        },
        {
          id: 8,
          label: '应发工资',
          value: '',
        },
        {
          id: 9,
          label: '实发工资',
          value: '',
        },
      ],
    }
  },
  methods: {
    onClose() {
      this.showSalaryDetail = false
    },
    showPop(date) {
      // 跳转并传输 date
      uni.navigateTo({
        url:
          '/pages/classification/user/salary-show/data-display/index?date=' +
          date,
      })
    },
  },
}
